package org.dmd.wsdl.server.generated.dmw;

// Generated from: org.dmd.util.codegen.ImportManager.getFormattedImports(ImportManager.java:82)
// Called from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:442)
import java.util.ArrayList;                                                           // Support for MULTI attribute - (BaseDMWGenerator.java:2226)
import java.util.Iterator;                                                            // Support copy of MV objects - (BaseDMWGenerator.java:2240)
import org.dmd.dmc.*;                                                                 // If any attributes - (BaseDMWGenerator.java:1087)
import org.dmd.dmc.definitions.DmcDefinitionIF;                                       // The object is a domain specific definition - (BaseDMWGenerator.java:411)
import org.dmd.dmc.types.DefinitionName;                                              // Is named by - (BaseDMWGenerator.java:1062)
import org.dmd.dms.ClassDefinition;                                                   // Passing derived class def up the hierarchy - (BaseDMWGenerator.java:1067)
import org.dmd.dms.generated.dmo.MetaDMSAG;                                           // Required for MODREC constructor - (BaseDMWGenerator.java:1072)
import org.dmd.dms.generated.types.DmcTypeModifierMV;                                 // Required for MODREC constructor - (BaseDMWGenerator.java:1071)
import org.dmd.wsdl.server.extended.WsdlDefinition;                                   // Derived class - (BaseDMWGenerator.java:1248)
import org.dmd.wsdl.server.extended.WsdlOperation;                                    // Required for getModificationRecorder() - (BaseDMWGenerator.java:1076)
import org.dmd.wsdl.server.generated.dmw.LabelledElementReferenceIterableDMW;         // For multi-valued LabelledElementReference - (BaseDMWGenerator.java:2103)
import org.dmd.wsdl.server.generated.dmw.LabelledFaultReferenceIterableDMW;           // For multi-valued LabelledFaultReference - (BaseDMWGenerator.java:2103)
import org.dmd.wsdl.shared.generated.dmo.DmwsdlDMSAG;                                 // Attribute input from the dmwsdl schema - (BaseDMWGenerator.java:897)
import org.dmd.wsdl.shared.generated.dmo.WsdlOperationDMO;                            // Class not auxiliary or abstract - (BaseDMWGenerator.java:1252)
import org.dmd.wsdl.shared.generated.types.LabelledElementReference;                  // Primitive type - (BaseDMWGenerator.java:1150)
import org.dmd.wsdl.shared.generated.types.LabelledFaultReference;                    // Primitive type - (BaseDMWGenerator.java:1150)
import org.dmd.wsdl.shared.generated.types.WsdlModuleREF;                             // Required to access defined in module name - (DMWGenerator.java:180)



/**
 * Each WsdlOperation specifies the types of messages that the service can
 * send or receive as\n part of that operation. Each operation also specifies
 * a message exchange pattern that indicates the sequence\n in which the
 * associated messages are to be transmitted between the parties.
 * <P>
 * Generated from the dmwsdl schema at version unknown
 * <P>
 * This code was auto-generated by the dmggenerator utility and shouldn't be alterred manually!
 * Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:479)
 */
abstract public class WsdlOperationDMW extends WsdlDefinition implements DmcDefinitionIF, DmcNamedObjectIF {

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:558)
    public WsdlOperationDMW() {
        super(new WsdlOperationDMO(), org.dmd.wsdl.server.generated.DmwsdlSchemaAG._WsdlOperation);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:564)
    public WsdlOperationDMW(DmcTypeModifierMV mods) {
        super(new WsdlOperationDMO(mods), org.dmd.wsdl.server.generated.DmwsdlSchemaAG._WsdlOperation);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:606)
    public WsdlOperation getModificationRecorder(){
        WsdlOperation rc = new WsdlOperation();
        rc.setName(getName());
        rc.setModifier(new DmcTypeModifierMV(MetaDMSAG.__modify));
        return(rc);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:627)
    public WsdlOperationDMW(WsdlOperationDMO obj) {
        super(obj, org.dmd.wsdl.server.generated.DmwsdlSchemaAG._WsdlOperation);
    }

    public WsdlOperation cloneIt() {
        WsdlOperation rc = new WsdlOperation();
        rc.setDmcObject(getDMO().cloneIt());
        return(rc);
    }

    public WsdlOperationDMO getDMO() {
        return((WsdlOperationDMO) core);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:642)
    protected WsdlOperationDMW(WsdlOperationDMO obj, ClassDefinition cd) {
        super(obj,cd);
    }

    // org.dmd.dmg.generators.BaseDMWGenerator.getAccessFunctions(BaseDMWGenerator.java:1297)
    public DefinitionName getObjectName(){
        return(((WsdlOperationDMO) core).getName());
    }

    public int hashCode(){
        return(getObjectName().hashCode());
    }

    public DmcAttribute<?> getObjectNameAttribute(){
        return(((WsdlOperationDMO) core).getObjectNameAttribute());
    }

    public boolean equals(Object obj){
        if (obj instanceof WsdlOperationDMW){
            return( getObjectName().equals( ((WsdlOperationDMW) obj).getObjectName()) );
        }
        return(false);
    }

    /**
     * @return The number of LabelledElementReference items.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:1671)
    public int getInputSize(){
        return(((WsdlOperationDMO) core).getInputSize());
    }

    /**
     * @return true if there are no LabelledElementReferenceDMO items.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:1679)
    public boolean getInputIsEmpty(){
        if (((WsdlOperationDMO) core).getInputSize() == 0)
            return(true);
        return(false);
    }

    /**
     * @return true if there are any LabelledElementReferenceDMO items.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:1689)
    public boolean getInputHasValue(){
        if (((WsdlOperationDMO) core).getInputSize() == 0)
            return(false);
        return(true);
    }

    /**
     * @return An Iterator of LabelledElementReference objects.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2107)
    public LabelledElementReferenceIterableDMW getInputIterable(){
        DmcAttribute<?> attr = core.get(DmwsdlDMSAG.__input);
        if (attr == null)
            return(LabelledElementReferenceIterableDMW.emptyList);
        
        return(new LabelledElementReferenceIterableDMW(((WsdlOperationDMO) core).getInput()));
    }

    /**
     * Adds another input value.
     * @param value A value compatible with LabelledElementReference
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2133)
    public void addInput(Object value) throws DmcValueException {
        ((WsdlOperationDMO) core).addInput(value);
    }

    /**
     * Adds another input value.
     * @param value A value compatible with LabelledElementReference
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2143)
    public void addInput(LabelledElementReference value){
        ((WsdlOperationDMO) core).addInput(value);
    }

    /**
     * Returns true if the collection contains the input value.
     * @param value A value compatible with LabelledElementReference
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2200)
    public boolean inputContains(LabelledElementReference value){
        return(((WsdlOperationDMO) core).inputContains(value));
    }

    /**
     * @return A COPY of the collection of LabelledElementReference objects.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2244)
    @SuppressWarnings("unchecked")
    public ArrayList<LabelledElementReference> getInputCopy(){
        DmcAttribute<?> attr = core.get(DmwsdlDMSAG.__input);
        if (attr == null)
            return(new ArrayList<LabelledElementReference>());
        
        ArrayList<LabelledElementReference> rc = new ArrayList<LabelledElementReference>(attr.getMVSize());
        
        Iterator<LabelledElementReference> it = (Iterator<LabelledElementReference>) attr.getMV();
        while(it.hasNext()){
            rc.add(it.next());
        }
        
        return(rc);
    }

    /**
     * Deletes a input value.
     * @param value The LabelledElementReference to be deleted from set of attribute values.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2271)
    public void delInput(Object value) throws DmcValueException {
        ((WsdlOperationDMO) core).delInput(value);
    }

    /**
     * Deletes a input value.
     * @param value The LabelledElementReference to be deleted from set of attribute values.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2280)
    public void delInput(LabelledElementReference value){
        ((WsdlOperationDMO) core).delInput(value);
    }

    /**
     * Removes the input attribute value.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2292)
    public void remInput(){
        ((WsdlOperationDMO) core).remInput();
    }

    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1474)
    public DefinitionName getName(){
        return(((WsdlOperationDMO) core).getName());
    }

    /**
     * Sets name to the specified value.
     * @param value A value compatible with DmcTypeDefinitionName
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1584)
    public void setName(Object value) throws DmcValueException {
        ((WsdlOperationDMO) core).setName(value);
    }

    /**
     * Sets name to the specified value.
     * @param value DefinitionName
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1593)
    public void setName(DefinitionName value){
        ((WsdlOperationDMO) core).setName(value);
    }

    /**
     * Removes the name attribute value.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1619)
    public void remName(){
        ((WsdlOperationDMO) core).remName();
    }

    /**
     * @return The number of LabelledFaultReference items.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:1671)
    public int getOutfaultSize(){
        return(((WsdlOperationDMO) core).getOutfaultSize());
    }

    /**
     * @return true if there are no LabelledFaultReferenceDMO items.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:1679)
    public boolean getOutfaultIsEmpty(){
        if (((WsdlOperationDMO) core).getOutfaultSize() == 0)
            return(true);
        return(false);
    }

    /**
     * @return true if there are any LabelledFaultReferenceDMO items.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:1689)
    public boolean getOutfaultHasValue(){
        if (((WsdlOperationDMO) core).getOutfaultSize() == 0)
            return(false);
        return(true);
    }

    /**
     * @return An Iterator of LabelledFaultReference objects.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2107)
    public LabelledFaultReferenceIterableDMW getOutfaultIterable(){
        DmcAttribute<?> attr = core.get(DmwsdlDMSAG.__outfault);
        if (attr == null)
            return(LabelledFaultReferenceIterableDMW.emptyList);
        
        return(new LabelledFaultReferenceIterableDMW(((WsdlOperationDMO) core).getOutfault()));
    }

    /**
     * Adds another outfault value.
     * @param value A value compatible with LabelledFaultReference
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2133)
    public void addOutfault(Object value) throws DmcValueException {
        ((WsdlOperationDMO) core).addOutfault(value);
    }

    /**
     * Adds another outfault value.
     * @param value A value compatible with LabelledFaultReference
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2143)
    public void addOutfault(LabelledFaultReference value){
        ((WsdlOperationDMO) core).addOutfault(value);
    }

    /**
     * Returns true if the collection contains the outfault value.
     * @param value A value compatible with LabelledFaultReference
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2200)
    public boolean outfaultContains(LabelledFaultReference value){
        return(((WsdlOperationDMO) core).outfaultContains(value));
    }

    /**
     * @return A COPY of the collection of LabelledFaultReference objects.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2244)
    @SuppressWarnings("unchecked")
    public ArrayList<LabelledFaultReference> getOutfaultCopy(){
        DmcAttribute<?> attr = core.get(DmwsdlDMSAG.__outfault);
        if (attr == null)
            return(new ArrayList<LabelledFaultReference>());
        
        ArrayList<LabelledFaultReference> rc = new ArrayList<LabelledFaultReference>(attr.getMVSize());
        
        Iterator<LabelledFaultReference> it = (Iterator<LabelledFaultReference>) attr.getMV();
        while(it.hasNext()){
            rc.add(it.next());
        }
        
        return(rc);
    }

    /**
     * Deletes a outfault value.
     * @param value The LabelledFaultReference to be deleted from set of attribute values.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2271)
    public void delOutfault(Object value) throws DmcValueException {
        ((WsdlOperationDMO) core).delOutfault(value);
    }

    /**
     * Deletes a outfault value.
     * @param value The LabelledFaultReference to be deleted from set of attribute values.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2280)
    public void delOutfault(LabelledFaultReference value){
        ((WsdlOperationDMO) core).delOutfault(value);
    }

    /**
     * Removes the outfault attribute value.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2292)
    public void remOutfault(){
        ((WsdlOperationDMO) core).remOutfault();
    }

    /**
     * @return The number of LabelledElementReference items.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:1671)
    public int getOutputSize(){
        return(((WsdlOperationDMO) core).getOutputSize());
    }

    /**
     * @return true if there are no LabelledElementReferenceDMO items.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:1679)
    public boolean getOutputIsEmpty(){
        if (((WsdlOperationDMO) core).getOutputSize() == 0)
            return(true);
        return(false);
    }

    /**
     * @return true if there are any LabelledElementReferenceDMO items.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:1689)
    public boolean getOutputHasValue(){
        if (((WsdlOperationDMO) core).getOutputSize() == 0)
            return(false);
        return(true);
    }

    /**
     * @return An Iterator of LabelledElementReference objects.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2107)
    public LabelledElementReferenceIterableDMW getOutputIterable(){
        DmcAttribute<?> attr = core.get(DmwsdlDMSAG.__output);
        if (attr == null)
            return(LabelledElementReferenceIterableDMW.emptyList);
        
        return(new LabelledElementReferenceIterableDMW(((WsdlOperationDMO) core).getOutput()));
    }

    /**
     * Adds another output value.
     * @param value A value compatible with LabelledElementReference
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2133)
    public void addOutput(Object value) throws DmcValueException {
        ((WsdlOperationDMO) core).addOutput(value);
    }

    /**
     * Adds another output value.
     * @param value A value compatible with LabelledElementReference
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2143)
    public void addOutput(LabelledElementReference value){
        ((WsdlOperationDMO) core).addOutput(value);
    }

    /**
     * Returns true if the collection contains the output value.
     * @param value A value compatible with LabelledElementReference
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2200)
    public boolean outputContains(LabelledElementReference value){
        return(((WsdlOperationDMO) core).outputContains(value));
    }

    /**
     * @return A COPY of the collection of LabelledElementReference objects.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2244)
    @SuppressWarnings("unchecked")
    public ArrayList<LabelledElementReference> getOutputCopy(){
        DmcAttribute<?> attr = core.get(DmwsdlDMSAG.__output);
        if (attr == null)
            return(new ArrayList<LabelledElementReference>());
        
        ArrayList<LabelledElementReference> rc = new ArrayList<LabelledElementReference>(attr.getMVSize());
        
        Iterator<LabelledElementReference> it = (Iterator<LabelledElementReference>) attr.getMV();
        while(it.hasNext()){
            rc.add(it.next());
        }
        
        return(rc);
    }

    /**
     * Deletes a output value.
     * @param value The LabelledElementReference to be deleted from set of attribute values.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2271)
    public void delOutput(Object value) throws DmcValueException {
        ((WsdlOperationDMO) core).delOutput(value);
    }

    /**
     * Deletes a output value.
     * @param value The LabelledElementReference to be deleted from set of attribute values.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2280)
    public void delOutput(LabelledElementReference value){
        ((WsdlOperationDMO) core).delOutput(value);
    }

    /**
     * Removes the output attribute value.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatMV(BaseDMWGenerator.java:2292)
    public void remOutput(){
        ((WsdlOperationDMO) core).remOutput();
    }

    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1474)
    public String getPattern(){
        return(((WsdlOperationDMO) core).getPattern());
    }

    /**
     * Sets pattern to the specified value.
     * @param value A value compatible with DmcTypeString
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1584)
    public void setPattern(Object value) throws DmcValueException {
        ((WsdlOperationDMO) core).setPattern(value);
    }

    /**
     * Sets pattern to the specified value.
     * @param value String
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1593)
    public void setPattern(String value){
        ((WsdlOperationDMO) core).setPattern(value);
    }

    /**
     * Removes the pattern attribute value.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1619)
    public void remPattern(){
        ((WsdlOperationDMO) core).remPattern();
    }

    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1474)
    public String getStyle(){
        return(((WsdlOperationDMO) core).getStyle());
    }

    /**
     * Sets style to the specified value.
     * @param value A value compatible with DmcTypeString
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1584)
    public void setStyle(Object value) throws DmcValueException {
        ((WsdlOperationDMO) core).setStyle(value);
    }

    /**
     * Sets style to the specified value.
     * @param value String
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1593)
    public void setStyle(String value){
        ((WsdlOperationDMO) core).setStyle(value);
    }

    /**
     * Removes the style attribute value.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1619)
    public void remStyle(){
        ((WsdlOperationDMO) core).remStyle();
    }

    // Generated from: org.dmd.dmg.generators.DMWGenerator.dumpAdditionalWrapperFunctions(DMWGenerator.java:221)
    /**
     * This method indicates the name of the module from which this definition was loaded.
     */
    @Override
    public String getNameOfModuleWhereThisCameFrom(){
        WsdlModuleREF ref = ((WsdlOperationDMO) core).getDefinedInWsdlModule();
        return(ref.getName().getNameString());
    }


}
